import Vue from "vue";
//引入刚才的http.js文件
import https from "./http.js";

//设置个对象，就不用一个个暴露了，直接暴露对象
let apiFun = {};
const baseData = "/base-data"
apiFun.webAppUrl = "http://8.130.105.125:10573/"
/* 公共接口 */
// 省市县
apiFun.getAreaTree = function (isNoLoad) {
  return https.get({
    url: "/base/api/sys/area/areaTree",
    loading: isNoLoad ? false : true,
  });
};

/* 字典值 */
// 字典值 列表
apiFun.getDictList = function (params) {
  return https.post({
    url: "/base/api/sys/dict/list",
    params: params,
  });
};
// 添加
apiFun.addDict = function (params) {
  return https.post({
    url: "/base/api/sys/dict/add",
    params: params,
  });
};
// 删除
apiFun.delDict = function (params) {
  return https.post({
    url: "/base/api/sys/dict/del",
    params: params,
  });
};
// 修改
apiFun.updateDict = function (params) {
  return https.post({
    url: "/base/api/sys/dict/update",
    params: params,
  });
};
// 详情
apiFun.getDictInfo = function (params) {
  return https.get({
    url: "/base/api/sys/dict/info",
    params: params,
  });
};

// 子类 list
apiFun.getDictDetail = function (params, isNoLoad) {
  return https.get({
    url: "/base/api/sys/dict/detail/detail",
    params: params,
    loading: isNoLoad ? false : true,
  });
};
// 字典值 添加子类
apiFun.addDictDetail = function (params) {
  return https.post({
    url: "/base/api/sys/dict/detail/add",
    params: params,
  });
};
// 字典值 修改子类
apiFun.updateDictDetail = function (params) {
  return https.post({
    url: "/base/api/sys/dict/detail/update",
    params: params,
  });
};
// 字典值 删除子类
apiFun.delDictDetail = function (params) {
  return https.post({
    url: "/base/api/sys/dict/detail/del",
    params: params,
  });
};

/* 登录 */
// 验证码
apiFun.getImgVerification = function (uuid) {
  return https.baseURL + "/auth/img/verification?uuid=" + uuid;
};
// 登录获取token
apiFun.oauthToken = function (params) {
  return https.post({
    url: "/auth/oauth/token",
    params: params,
    other: {
      headers: {
        "Content-Type": "application/json",
      },
      auth: {
        username: "c8c0a918-16b7-45a8-93a5-7ace9a10568c",
        password:
          "$2a$10$XKGi5cUZuLgBUg1x9GzfvesNeybPjDSBE5tChXZlRxG3v6h3rkKK6",
      },
    },
  });
};

/* 用户管理 */
// 列表
apiFun.getUserManageList = function (params) {
  return https.post({
    url: "/base/api/sys/user/list",
    params: params,
  });
};
// 详情
apiFun.getUserManageInfo = function (params) {
  return https.get({
    url: "/base/api/sys/user/info",
    params: params,
  });
};
// 新增
apiFun.addUserManage = function (params) {
  return https.post({
    url: "/base/api/sys/user/add",
    params: params,
  });
};
// 删除
apiFun.delUserManage = function (params) {
  return https.post({
    url: "/base/api/sys/user/del",
    params: params,
  });
};
// 修改
apiFun.updateUserManage = function (params) {
  return https.post({
    url: "/base/api/sys/user/update",
    params: params,
  });
};
// 启用/禁用
apiFun.changeStatusUserManage = function (params) {
  return https.post({
    url: "/base/api/sys/user/changeStatus",
    params: params,
  });
};
// 修改密码
apiFun.userManageUpdatePassword = function (params) {
  return https.post({
    url: "/base/api/sys/user/updatePassword",
    params: params,
  });
};
// 查询地图服务
apiFun.getUserMapService = function (params) {
  return https.get({
    url: "/base/api/sys/user/map/service/userMapService",
    params: params,
  });
};
// 设置用户地图服务权限
apiFun.setUserMapService = function (params) {
  return https.post({
    url: "/base/api/sys/user/map/service/setUserMapService",
    params: params,
  });
};

/* 角色管理 */
// 列表
apiFun.getRoleManageList = function (params) {
  return https.post({
    url: "/base/api/sys/role/list",
    params: params,
  });
};
// 详情
apiFun.getRoleManageInfo = function (params) {
  return https.get({
    url: "/base/api/sys/role/info",
    params: params,
  });
};
// 新增
apiFun.addRoleManage = function (params) {
  return https.post({
    url: "/base/api/sys/role/add",
    params: params,
  });
};
// 删除
apiFun.delRoleManage = function (params) {
  return https.post({
    url: "/base/api/sys/role/del",
    params: params,
  });
};
// 修改
apiFun.updateRoleManage = function (params) {
  return https.post({
    url: "/base/api/sys/role/update",
    params: params,
  });
};
// 启用/禁用
apiFun.changeStatusRoleManage = function (params) {
  return https.post({
    url: "/base/api/sys/role/changeStatus",
    params: params,
  });
};
// 查询当前角色绑定菜单树
apiFun.getRoleMenuTree = function (params) {
  return https.get({
    url: "/base/api/sys/role/menu/roleMenuTree",
    params: params,
  });
};
// 设置角色菜单权限
apiFun.setRoleMenu = function (params) {
  return https.post({
    url: "/base/api/sys/role/menu/setRoleMenu",
    params: params,
  });
};

/* 菜单管理 */
// 列表
apiFun.getMenuManageList = function (params) {
  return https.post({
    url: "/base/api/sys/menu/listTree",
    params: params,
  });
};
// 获取菜单树
apiFun.getMenuTree = function () {
  return https.get({ url: "/base/api/sys/menu/menuTree" });
};
// 详情
apiFun.getMenuManageInfo = function (params) {
  return https.get({
    url: "/base/api/sys/menu/info",
    params: params,
  });
};
// 新增
apiFun.addMenuManage = function (params) {
  return https.post({
    url: "/base/api/sys/menu/add",
    params: params,
  });
};
// 删除
apiFun.delMenuManage = function (params) {
  return https.post({
    url: "/base/api/sys/menu/del",
    params: params,
  });
};
// 修改
apiFun.updateMenuManage = function (params) {
  return https.post({
    url: "/base/api/sys/menu/update",
    params: params,
  });
};
// 启用/禁用
apiFun.changeStatusMenuManage = function (params) {
  return https.post({
    url: "/base/api/sys/menu/changeStatus",
    params: params,
  });
};

/* 组织机构 */
// 列表
apiFun.getOrganManageList = function (params) {
  return https.post({
    url: "/base/api/sys/organization/listTree",
    params: params,
  });
};
// 获取组织机构树
apiFun.getOrganTree = function () {
  return https.get({ url: "/base/api/sys/organization/orgTree" });
};
// 详情
apiFun.getOrganManageInfo = function (params) {
  return https.get({
    url: "/base/api/sys/organization/info",
    params: params,
  });
};
// 新增
apiFun.addOrganManage = function (params) {
  return https.post({
    url: "/base/api/sys/organization/add",
    params: params,
  });
};
// 删除
apiFun.delOrganManage = function (params) {
  return https.post({
    url: "/base/api/sys/organization/del",
    params: params,
  });
};
// 修改
apiFun.updateOrganManage = function (params) {
  return https.post({
    url: "/base/api/sys/organization/update",
    params: params,
  });
};

/**文件操作 */
// 通用上传文件
apiFun.uploadFile = function (params) {
  return https.post({
    url: "/base/api/file/upload",
    params: params,
    contentType: "multipart/form-data;",
  });
};
// 根据业务编码查询附件
apiFun.selectAttach = function (params) {
  return https.get({
    url: "/base/api/attach/manage/info",
    params: params,
  });
};
// 附件关联业务数据
apiFun.saveAttach = function (params) {
  return https.post({
    url: "/base/api/attach/manage/add/batch",
    params: params,
    contentType: "multipart/form-data;",
  });
};
// 通用文件加载
apiFun.downloadFile = function (id) {
  return https.get({
    url: '/base/api/file/download?id=' + id,
    other: {
      responseType: "blob",
      contentType: 'application/octet-stream;charset:utf-8'
    }
  });
};

/** 通用接口 */
apiFun.getAreaTree = function (params) {
  return https.get({
    url: `${baseData}/api/basic/area/areaTree`,
    params: params,
  });
};

apiFun.getBasinTree = function (params) {
  return https.get({
    url: `${baseData}/api/basic/basin/basinTree`,
    params: params,
  });
};

//** 地表水监测网站-取水口管理 */
//取水口管理新增
apiFun.addWaterIntake = function (params) {
  return https.post({
    url: `${baseData}/api/basic/water/intake/add`,
    params: params
  });
};
//检查取水口编码是否已存在
apiFun.checkWaterIntake = function (params) {
  return https.get({
    url: `${baseData}/api/basic/water/intake/check`,
    params: params,
  });
};
//删除取水口数据
apiFun.delWaterIntake = function (params) {
  return https.post({
    url: `${baseData}/api/basic/water/intake/del`,
    params: params,
  });
};

//导出
apiFun.exportWaterIntake = function (params) {
  return https.post({
    url: `${baseData}/api/basic/water/intake/export`,
    params: params,
  });
};
//单个查询
apiFun.getWaterIntakeInfo = function (params) {
  return https.get({
    url: `${baseData}/api/basic/water/intake/info`,
    params: params,
  });
};
//查询分页数据
apiFun.getWaterIntakeList = function (params) {
  return https.post({
    url: `${baseData}/api/basic/water/intake/list`,
    params: params,
  });
};

apiFun.updateWaterIntake = function (params) {
  return https.post({
    url: `${baseData}/api/basic/water/intake/update`,
    params: params,
  });
};
//获取取水户下拉菜单
apiFun.getWaterIntakeListecNums = function (params) {
  return https.get({
    url: `${baseData}/api/basic/water/intake/list/ecNums`,
    params: params,
  });
};
//获取取水口下拉菜单
apiFun.getWaterIntakeListecNumsSubs = function (params) {
  return https.get({
    url: `${baseData}/api/basic/water/intake/list/ecNumSubs`,
    params: params,
  });
};
/** 地表水监测网站 - 生态断面管理 */
apiFun.addEcologicalSection = function (params) {
  return https.post({
    url: `${baseData}/api/basic/ecological/section/add`,
    params: params
  });
};

apiFun.delEcologicalSection = function (params) {
  return https.post({
    url: `${baseData}/api/basic/ecological/section/del`,
    params: params,
  });
};

apiFun.exportEcologicalSection = function (params) {
  return https.post({
    url: `${baseData}/api/basic/ecological/section/export`,
    params: params
  });
};

apiFun.getEcologicalSectionInfo = function (params) {
  return https.get({
    url: `${baseData}/api/basic/ecological/section/info`,
    params: params,
  });
};

apiFun.getEcologicalSectionList = function (params) {
  return https.post({
    url: `${baseData}/api/basic/ecological/section/list`,
    params: params
  });
};

apiFun.updateEcologicalSection = function (params) {
  return https.post({
    url: `${baseData}/api/basic/ecological/section/update`,
    params: params
  });
};

/** 地表水监测网站 - 水文站管理 */
apiFun.addHydroStation = function (params) {
  return https.post({
    url: `${baseData}/api/basic/hydro/station/add`,
    params: params
  });
};

apiFun.delHydroStation = function (params) {
  return https.post({
    url: `${baseData}/api/basic/hydro/station/del`,
    params: params,
  });
};

apiFun.exportHydroStation = function (params) {
  return https.post({
    url: `${baseData}/api/basic/hydro/station/export`,
    params: params
  });
};

apiFun.getHydroStationInfo = function (params) {
  return https.get({
    url: `${baseData}/api/basic/hydro/station/info`,
    params: params,
  });
};

apiFun.getHydroStationList = function (params) {
  return https.post({
    url: `${baseData}/api/basic/hydro/station/list`,
    params: params
  });
};

apiFun.updateHydroStation = function (params) {
  return https.post({
    url: `${baseData}/api/basic/hydro/station/update`,
    params: params
  });
};

/** 地表水监测网站 - 水质监测站 */
apiFun.addQualityStation = function (params) {
  return https.post({
    url: `${baseData}/api/basic/quality/station/add`,
    params: params
  });
};

apiFun.delQualityStation = function (params) {
  return https.post({
    url: `${baseData}/api/basic/quality/station/del`,
    params: params,
  });
};

apiFun.exportQualityStation = function (params) {
  return https.post({
    url: `${baseData}/api/basic/quality/station/export`,
    params: params
  });
};

apiFun.getQualityStationInfo = function (params) {
  return https.get({
    url: `${baseData}/api/basic/quality/station/info`,
    params: params,
  });
}
apiFun.getQualityStationList = function (params) {
  return https.post({
    url: `${baseData}/api/basic/quality/station/list`,
    params: params
  });
};

apiFun.updateQualityStation = function (params) {
  return https.post({
    url: `${baseData}/api/basic/quality/station/update`,
    params: params
  });
};

/** 地表水监测网站 - 气象监测站 */
apiFun.addWeatherStation = function (params) {
  return https.post({
    url: `${baseData}/api/basic/weather/station/add`,
    params: params
  });
};

apiFun.delWeatherStation = function (params) {
  return https.post({
    url: `${baseData}/api/basic/weather/station/del`,
    params: params,
  });
};

apiFun.exportWeatherStation = function (params) {
  return https.post({
    url: `${baseData}/api/basic/weather/station/export`,
    params: params
  });
};

apiFun.getWeatherStationInfo = function (params) {
  return https.get({
    url: `${baseData}/api/basic/weather/station/info`,
    params: params,
  });
}
apiFun.getWeatherStationList = function (params) {
  return https.post({
    url: `${baseData}/api/basic/weather/station/list`,
    params: params
  });
};

apiFun.updateWeatherStation = function (params) {
  return https.post({
    url: `${baseData}/api/basic/weather/station/update`,
    params: params
  });
};
//气象站下拉菜单
/*apiFun.getWeatherStationOptions = function (params) {
  return https.get({
    url: `${baseData}/api/basic/weather/station/list/weather`,
    params: params,
  });
}*/

/** 地表水指标管理 - 可用水量管理 */
apiFun.addWaterAvailable = function (params) {
  return https.post({
    url: `${baseData}/api/water/available/add`,
    params: params
  });
};

apiFun.delWaterAvailable  = function (params) {
  return https.post({
    url: `${baseData}/api/water/available/del`,
    params: params,
  });
};

apiFun.exportWaterAvailable  = function (params) {
  return https.post({
    url: `${baseData}/api/water/available/export`,
    params: params
  });
};

apiFun.getWaterAvailableInfo = function (params) {
  return https.get({
    url: `${baseData}/api/water/available/info`,
    params: params,
  });
}
apiFun.getWaterAvailableList = function (params) {
  return https.post({
    url: `${baseData}/api/water/available/list`,
    params: params
  });
};

apiFun.updateWaterAvailable = function (params) {
  return https.post({
    url: `${baseData}/api/water/available/update`,
    params: params
  });
};

/** 地表水指标管理 - 取水许可管理 */
apiFun.addWaterIntakePermit = function (params) {
  return https.post({
    url: `${baseData}/api/water/intake/permit/add`,
    params: params
  });
};

apiFun.delWaterIntakePermit  = function (params) {
  return https.post({
    url: `${baseData}/api/water/intake/permit/del`,
    params: params,
  });
};

apiFun.exportWaterIntakePermit  = function (params) {
  return https.post({
    url: `${baseData}/api/water/intake/permit/export`,
    params: params
  });
};

apiFun.getWaterIntakePermitInfo = function (params) {
  return https.get({
    url: `${baseData}/api/water/intake/permit/info`,
    params: params,
  });
}
apiFun.getWaterIntakePermitList = function (params) {
  return https.post({
    url: `${baseData}/api/water/intake/permit/list`,
    params: params
  });
};

apiFun.updateWaterIntakePermit = function (params) {
  return https.post({
    url: `${baseData}/api/water/intake/permit/update`,
    params: params
  });
};


apiFun.getEcNums = function (params) {
  return https.get({
    url: `${baseData}/api/basic/water/intake/list/ecNums`,
    params: params
  });
};

apiFun.getEcNumSubs = function (params) {
  return https.get({
    url: `${baseData}/api/basic/water/intake/list/ecNumSubs`,
    params: params
  });
};

/** 地表水指标管理 - 监测水量管理 */
apiFun.addMonitoring = function (params) {
  return https.post({
    url: `${baseData}/api/water/monitoring/add`,
    params: params
  });
};

apiFun.delMonitoring  = function (params) {
  return https.post({
    url: `${baseData}/api/water/monitoring/del`,
    params: params,
  });
};

apiFun.exportMonitoring  = function (params) {
  return https.post({
    url: `${baseData}/api/water/monitoring/export`,
    params: params
  });
};

apiFun.getMonitoringInfo = function (params) {
  return https.get({
    url: `${baseData}/api/water/monitoring/info`,
    params: params,
  });
}
apiFun.getMonitoringList = function (params) {
  return https.post({
    url: `${baseData}/api/water/monitoring/list`,
    params: params
  });
};

apiFun.updateMonitoring = function (params) {
  return https.post({
    url: `${baseData}/api/water/monitoring/update`,
    params: params
  });
};

/** 地表水指标管理 - 统计水量管理 */
apiFun.addStatistics = function (params) {
  return https.post({
    url: `${baseData}/api/water/statistics/add`,
    params: params
  });
};

apiFun.delStatistics  = function (params) {
  return https.post({
    url: `${baseData}/api/water/statistics/del`,
    params: params,
  });
};

apiFun.exportStatistics  = function (params) {
  return https.post({
    url: `${baseData}/api/water/statistics/export`,
    params: params
  });
};

apiFun.getStatisticsInfo = function (params) {
  return https.get({
    url: `${baseData}/api/water/statistics/info`,
    params: params,
  });
}
apiFun.getStatisticsList = function (params) {
  return https.post({
    url: `${baseData}/api/water/statistics/list`,
    params: params
  });
};

apiFun.updateStatistics = function (params) {
  return https.post({
    url: `${baseData}/api/water/statistics/update`,
    params: params
  });
};

//** 河湖复苏管理-复苏河湖信息管理 */
//复苏河湖信息管理-新增
apiFun.addHeHuInfo = function (params) {
  return https.post({
    url: `${baseData}/api/basic/reviving/river/add`,
    params: params
  });
};
//复苏河湖信息管理-删除
apiFun.deleteHeHuInfo = function (params) {
  return https.post({
    url: `${baseData}/api/basic/reviving/river/del`,
    params: params
  });
};

//删除数据
apiFun.delHeHuInfo = function (params) {
  return https.post({
    url: `${baseData}/api/basic/water/intake/del`,
    params: params,
  });
};
//导出
/*apiFun.exportHeHuInfo = function (params) {
  return https.post({
    url: `${baseData}/api/basic/water/intake/export`,
    params: params,
  });
};*/
//单个查询
apiFun.getHeHuInfo = function (params) {
  return https.get({
    url: `${baseData}/api/basic/reviving/river/info`,
    params: params,
  });
};

apiFun.getParty = function (params) {
  return https.get({
    url: `${baseData}/api/basic/responsible/party/list/party`,
    params: params,
  });
};

//查询分页数据
apiFun.getHeHuInfoList = function (params) {
  return https.post({
    url: `${baseData}/api/basic/reviving/river/list`,
    params: params,
  });
};
apiFun.updateHeHuInfo = function (params) {
      return https.post({
        url: `${baseData}/api/basic/reviving/river/update`,
        params: params,
      });
    };
//** 河湖复苏管理-复苏河湖指标管理 */
//新增
apiFun.addHeHuMetrics = function (params) {
      return https.post({
        url: `${baseData}/api/basic/reviving/river/metrics/add`,
        params: params
      });
    };
apiFun.delHeHuMetrics = function (params) {
      return https.post({
        url: `${baseData}/api/basic/reviving/river/metrics/del`,
        params: params,
      });
    };
//导出
    /*apiFun.exportHeHuMetrics = function (params) {
      return https.post({
        url: `${baseData}/api/basic/water/intake/export`,
        params: params,
      });
    };*/
//id查询
    apiFun.getHeHuMetrics = function (params) {
      return https.get({
        url: `${baseData}/api/basic/reviving/river/metrics/info`,
        params: params,
      });
    };
//查询分页数据
    apiFun.getHeHuMetricsList = function (params) {
      return https.post({
        url: `${baseData}/api/basic/reviving/river/metrics/list`,
        params: params,
      });
    };

apiFun.updateHeHuMetrics = function (params) {
  return https.post({
    url: `${baseData}/api/basic/reviving/river/metrics/update`,
    params: params,
  });
};
//查询所有数据
apiFun.getAllHuMetrics = function (params) {
  return https.post({
    url: `${baseData}/api/basic/reviving/river/metrics/data`,
    params: params,
  });
};
//** 河湖复苏管理-复苏河湖评分管理 */
//新增
apiFun.addHeHuScoring = function (params) {
  return https.post({
    url: `${baseData}/api/basic/reviving/river/metrics/scoring/statistics/add`,
    params: params
  });
};
apiFun.delHeHuScoring = function (params) {
  return https.post({
    url: `${baseData}/api/basic/reviving/river/metrics/scoring/statistics/del`,
    params: params,
  });
};
//导出
apiFun.exportHeHuScoring = function (params) {
  return https.post({
    url: `${baseData}/api/basic/reviving/river/metrics/scoring/statistics/export`,
    params: params,
  });
};
//id查询
apiFun.getHeHuScoring = function (params) {
  return https.get({
    url: `${baseData}/api/basic/reviving/river/metrics/scoring/statistics/info`,
    params: params,
  });
};
//查询分页数据
apiFun.getHeHuScoringList = function (params) {
  return https.post({
    url: `${baseData}/api/basic/reviving/river/metrics/scoring/statistics/list`,
    params: params,
  });
};

apiFun.updateHeHuScoring = function (params) {
  return https.post({
    url: `${baseData}/api/basic/reviving/river/metrics/scoring/statistics/update`,
    params: params,
  });
};

//获取指标分项得分
//id查询
apiFun.getHeHuEveryScoring = function (params) {
  return https.get({
    url: `${baseData}/api/basic/reviving/river/metrics/scoring/info`,
    params: params,
  });
};


//获取复苏河湖信息下拉菜单
apiFun.getRevivingRiverName = function (params) {
  return https.get({
    url: `${baseData}/api/basic/reviving/river/list/revivingRiver`,
    params: params,
  });
};

//**水文站水量监测*/
//查询分页数据
apiFun.getWaterMonitorList = function (params) {
  return https.post({
    url: `${baseData}/api/basic/hydro/station/water/monitoring/list`,
    params: params,
  });
};
//查询全部
apiFun.getAllWaterMonitorList = function (params) {
  return https.post({
    url: `${baseData}/api/basic/hydro/station/water/monitoring/data`,
    params: params,
  });
};
//新增
apiFun.addWaterMonitor = function (params) {
  return https.post({
    url: `${baseData}/api/basic/hydro/station/water/monitoring/add`,
    params: params
  });
};
apiFun.delWaterMonitor = function (params) {
  return https.post({
    url: `${baseData}/api/basic/hydro/station/water/monitoring/del`,
    params: params,
  });
};
//导出
/*apiFun.exportWaterMonitor = function (params) {
  return https.post({
    url: `${baseData}/api/basic/water/intake/export`,
    params: params,
  });
};*/
//id查询
apiFun.getWaterMonitor = function (params) {
  return https.get({
    url: `${baseData}/api/basic/hydro/station/water/monitoring/info`,
    params: params,
  });
};
apiFun.updateWaterMonitor = function (params) {
  return https.post({
    url: `${baseData}/api/basic/hydro/station/water/monitoring/update`,
    params: params,
  });
};

//**水质监测 */
//新增
apiFun.addWaterQualityMonitor = function (params) {
  return https.post({
    url: `${baseData}/api/basic/quality/station/monitor/add`,
    params: params
  });
};
//查询全部
apiFun.getAllWaterQualityMonitor = function (params) {
  return https.post({
    url: `${baseData}/api/basic/quality/station/monitor/data`,
    params: params
  });
};
apiFun.delWaterQualityMonitor = function (params) {
  return https.post({
    url: `${baseData}/api/basic/quality/station/monitor/del`,
    params: params,
  });
};
//导出
apiFun.exportWaterQualityMonitor = function (params) {
  return https.post({
    url: `${baseData}/api/basic/quality/station/monitor/export`,
    params: params,
  });
};
//id查询
apiFun.getWaterQualityMonitor = function (params) {
  return https.get({
    url: `${baseData}/api/basic/quality/station/monitor/info`,
    params: params,
  });
};
//查询分页数据
apiFun.getWaterQualityMonitorList = function (params) {
  return https.post({
    url: `${baseData}/api/basic/quality/station/monitor/list`,
    params: params,
  });
};

apiFun.updateWaterQualityMonitor = function (params) {
  return https.post({
    url: `${baseData}/api/basic/quality/station/monitor/update`,
    params: params,
  });
};

/**河流水位监测 */
//新增
apiFun.addRiverWaterMonitor = function (params) {
  return https.post({
    url: `${baseData}/api/basic/river/water/level/add`,
    params: params
  });
};
//查询全部
apiFun.getAllRiverWaterMonitor = function (params) {
  return https.post({
    url: `${baseData}/api/basic/river/water/level/data`,
    params: params
  });
};
apiFun.delRiverWaterMonitor = function (params) {
  return https.post({
    url: `${baseData}/api/basic/river/water/level/del`,
    params: params,
  });
};
//导出
/*apiFun.exportRiverWaterMonitor = function (params) {
  return https.post({
    url: `${baseData}/api/basic/quality/station/monitor/export`,
    params: params,
  });
};*/
//id查询
apiFun.getRiverWaterMonitor = function (params) {
  return https.get({
    url: `${baseData}/api/basic/river/water/level/info`,
    params: params,
  });
};
//查询分页数据
apiFun.getRiverWaterMonitorList = function (params) {
  return https.post({
    url: `${baseData}/api/basic/river/water/level/list`,
    params: params,
  });
};

apiFun.updateRiverWaterMonitorMonitor = function (params) {
  return https.post({
    url: `${baseData}/api/basic/river/water/level/update`,
    params: params,
  });
};

//获取水文站下拉菜单
apiFun.getWaterstationName = function (params) {
  return https.get({
    url: `${baseData}/api/basic/hydro/station/list/hydro`,
    params: params
  });
};
//获取水文站下拉菜单（有水量监测数据的站点）
apiFun.getHasWaterstationName = function (params) {
  return https.get({
    url: `${baseData}/api/basic/hydro/station/list/water/hydro`,
    params: params
  });
};
//获取水质站下拉菜单
apiFun.getWaterQualityStationName = function (params) {
  return https.get({
    url: `${baseData}/api/basic/quality/station/list/quality`,
    params: params
  });
};
//获取水质站下拉菜单（有水质监测数据的站点）
apiFun.getHasWaterQualityStationName = function (params) {
  return https.get({
    url: `${baseData}/api/basic/quality/station/list/water/quality`,
    params: params
  });
};

//获取河流下拉菜单
apiFun.getRiverName = function (params) {
  return https.get({
    url: `${baseData}/api/basic/river/list/river`,
    params: params
  });
};
//获取有数据河流下拉菜单
apiFun.getHasRiverName = function (params) {
  return https.get({
    url: `${baseData}/api/basic/river/list/water/river`,
    params: params
  });
};
//id查询
apiFun.getRiverWaterMonitor = function (params) {
  return https.get({
    url: `${baseData}/api/basic/river/water/level/info`,
    params: params,
  });
};


//**生态断面监测/
//
apiFun.getSectionMonitorName = function (params) {
  return https.get({
    url: `${baseData}/api/basic/ecological/section/list/ecological`,
    params: params
  });
};
apiFun.getHasSectionMonitorName = function (type,params) {
  let nameUrl=''
  switch (type){
    case '1':
      nameUrl=`${baseData}/api/basic/ecological/section/list/water/ecological`;
      break;
    case '2':
      nameUrl=`${baseData}/api/basic/ecological/section/list/flow/ecological`;
      break;
    default:
      nameUrl=`${baseData}/api/basic/ecological/section/list/water/ecological`;
  }
  return https.get({
    url: nameUrl,
    params: params
  });
};

//新增
apiFun.addSectionMonitor = function (params) {
  let nameUrl=''
  switch (params.dmlx){
    case '1':
      nameUrl=`${baseData}/api/basic/ecological/section/water/level/add`;
      params.waterLevel = params.monitorValue
      break;
    case '2':
      nameUrl=`${baseData}/api/basic/ecological/section/flow/add`;
      params.flow = params.monitorValue
      break;
    default:
      nameUrl=`${baseData}/api/basic/ecological/section/water/level/add`;
  }
  console.log(`nameUrl:${nameUrl}`)
  return https.post({
    url: nameUrl,
    params: params
  });
};

apiFun.delWaterSTDM = function (params) {
  let nameUrl=''
  nameUrl=`${baseData}/api/basic/ecological/section/water/level/del`;
  return https.post({
    url: nameUrl,
    params: params
  });
};

apiFun.delFlowSTDM = function (params) {
  let nameUrl=`${baseData}/api/basic/ecological/section/flow/del`;
  return https.post({
    url: nameUrl,
    params: params
  });
};
//导出
apiFun.exportSectionMonitor = function (type,params) {
  /*return https.post({
    url: `${baseData}/api/basic/water/intake/export`,
    params: params,
  });*/
};
//id查询
apiFun.getSectionMonitor = function (type,params) {
  let nameUrl=''
  switch (type){
    case '1':
      nameUrl=`${baseData}/api/basic/ecological/section/water/level/info`;
      break;
    case '2':
      nameUrl=`${baseData}/api/basic/ecological/section/flow/info`;
      break;
    default:
      nameUrl=`${baseData}/api/basic/ecological/section/water/level/info`;
  }
  return https.get({
    url: nameUrl,
    params: params
  });
};
//查询分页数据
apiFun.getSectionMonitorList = function (type,params) {
  let nameUrl=''
  switch (type){
    case '1':
      nameUrl=`${baseData}/api/basic/ecological/section/water/level/list`;
      break;
    case '2':
      nameUrl=`${baseData}/api/basic/ecological/section/flow/list`;
      break;
    default:
      nameUrl=`${baseData}/api/basic/ecological/section/water/level/list`;
  }
  return https.post({
    url: nameUrl,
    params: params
  });
};

apiFun.updateSectionMonitor = function (params) {
  let nameUrl=''
  switch (params.dmlx){
    case '1':
      nameUrl=`${baseData}/api/basic/ecological/section/water/level/update`;
      break;
    case '2':
      nameUrl=`${baseData}/api/basic/ecological/section/flow/update`;
      break;
    default:
      nameUrl=`${baseData}/api/basic/ecological/section/water/level/update`;
  }
  return https.post({
    url: nameUrl,
    params: params
  });
};

//查询全部数据
apiFun.getAllSectionMonitor = function (type,params) {
  let nameUrl=''
  switch (type){
    case '1':
      nameUrl=`${baseData}/api/basic/ecological/section/water/level/data`;
      break;
    case '2':
      nameUrl=`${baseData}/api/basic/ecological/section/flow/data`;
      break;
    default:
      nameUrl=`${baseData}/api/basic/ecological/section/water/level/data`;
  }
  return https.post({
    url: nameUrl,
    params: params
  });
};

//河道生态补水管理
apiFun.addRiverReplenish = function (params) {
  return https.post({
    url: `${baseData}/api/basic/reviving/river/replenish/add`,
    params: params
  });
};

apiFun.delRiverReplenish  = function (params) {
  return https.post({
    url: `${baseData}/api/basic/reviving/river/replenish/del`,
    params: params,
  });
};

apiFun.exportRiverReplenish  = function (params) {
  return https.post({
    url: `${baseData}/api/basic/reviving/river/replenish/export`,
    params: params
  });
};

apiFun.getRiverReplenishById = function (params) {
  return https.get({
    url: `${baseData}/api/basic/reviving/river/replenish/info`,
    params: params,
  });
}
apiFun.getRiverReplenishList = function (params) {
  return https.post({
    url: `${baseData}/api/basic/reviving/river/replenish/list`,
    params: params
  });
};

apiFun.updateRiverReplenish = function (params) {
  return https.post({
    url: `${baseData}/api/basic/reviving/river/replenish/update`,
    params: params
  });
};

//**气象战监测数据//
//获取名称
apiFun.getWeatherStationName = function (params) {
  return https.get({
    url: '/api/basic/weather/station/list/weather',
    params: params
  });
};
//获取名称
apiFun.getHasWeatherStationName = function (type,params) {
  let nameUrl=''
  switch (type){
    case '1':
      nameUrl=`${baseData}/api/basic/weather/station/list/temperature/weather`;
      break;
    case '2':
      nameUrl=`${baseData}/api/basic/weather/station/list/humidity/weather`;
      break;
    case '3':
      nameUrl=`${baseData}/api/basic/weather/station/list/radiation/weather`;
      break;
    case '4':
      nameUrl=`${baseData}/api/basic/weather/station/list/rainfall/weather`;
      break;
    case '5':
      nameUrl=`${baseData}/api/basic/weather/station/list/windspeed/weather`;
      break;
    default:
      nameUrl=`${baseData}/api/basic/weather/station/list/humidity/weather`;
  }
  return https.get({
    url: nameUrl,
    params: params
  });
};

//新增
apiFun.addWeatherStationMonitor = function (type,params) {
  let nameUrl=''
  switch (type){
    case '1':
      nameUrl=`${baseData}/api/basic/weather/station/temperature/add`;
      break;
    case '2':
      nameUrl=`${baseData}/api/basic/weather/station/humidity/add`;
      break;
    case '3':
      nameUrl=`${baseData}/api/basic/weather/station/radiation/add`;
      break;
    case '4':
      nameUrl=`${baseData}/api/basic/weather/station/rainfall/add`;
      break;
    case '5':
      nameUrl=`${baseData}/api/basic/weather/station/wind/speed/add`;
      break;
    default:
      nameUrl=`${baseData}/api/basic/weather/station/temperature/add`;
  }
  return https.post({
    url: nameUrl,
    params: params
  });
};
//删除数据
apiFun.delWeatherStationMonitor = function (type,params) {
  let nameUrl=''
  switch (type){
    case '1':
      nameUrl=`${baseData}/api/basic/weather/station/temperature/del`;
      break;
    case '2':
      nameUrl=`${baseData}/api/basic/weather/station/humidity/del`;
      break;
    case '3':
      nameUrl=`${baseData}/api/basic/weather/station/radiation/del`;
      break;
    case '4':
      nameUrl=`${baseData}/api/basic/weather/station/rainfall/del`;
      break;
    case '5':
      nameUrl=`${baseData}/api/basic/weather/station/wind/speed/del`;
      break;
    default:
      nameUrl=`${baseData}/api/basic/weather/station/temperature/del`;
  }
  return https.post({
    url: nameUrl,
    params: params
  });
};
//导出
apiFun.exportWeatherStationMonitor = function (type,params) {
  /*return https.post({
    url: `${baseData}/api/basic/water/intake/export`,
    params: params,
  });*/
};
//id查询
apiFun.getWeatherStationMonitor = function (type,params) {
  let nameUrl=''
  switch (type){
    case '1':
      nameUrl=`${baseData}/api/basic/weather/station/temperature/info`;
      break;
    case '2':
      nameUrl=`${baseData}/api/basic/weather/station/humidity/info`;
      break;
    case '3':
      nameUrl=`${baseData}/api/basic/weather/station/radiation/info`;
      break;
    case '4':
      nameUrl=`${baseData}/api/basic/weather/station/rainfall/info`;
      break;
    case '5':
      nameUrl=`${baseData}/api/basic/weather/station/wind/speed/info`;
      break;
    default:
      nameUrl=`${baseData}/api/basic/weather/station/temperature/info`;
  }
  return https.get({
    url: nameUrl,
    params: params
  });
};
//查询分页数据
apiFun.getWeatherStationMonitorList = function (type,params) {
  let nameUrl=''
  switch (type){
    case '1':
      nameUrl=`${baseData}/api/basic/weather/station/temperature/list`;
      break;
    case '2':
      nameUrl=`${baseData}/api/basic/weather/station/humidity/list`;
      break;
    case '3':
      nameUrl=`${baseData}/api/basic/weather/station/radiation/list`;
      break;
    case '4':
      nameUrl=`${baseData}/api/basic/weather/station/rainfall/list`;
      break;
    case '5':
      nameUrl=`${baseData}/api/basic/weather/station/wind/speed/list`;
      break;
    default:
      nameUrl=`${baseData}/api/basic/weather/station/temperature/list`;
  }
  return https.post({
    url: nameUrl,
    params: params
  });
};

//查询全部
apiFun.getAllWeatherStationMonitorList = function (type,params) {
  let nameUrl=''
  switch (type){
    case '1':
      nameUrl=`${baseData}/api/basic/weather/station/temperature/data`;
      break;
    case '2':
      nameUrl=`${baseData}/api/basic/weather/station/humidity/data`;
      break;
    case '3':
      nameUrl=`${baseData}/api/basic/weather/station/radiation/data`;
      break;
    case '4':
      nameUrl=`${baseData}/api/basic/weather/station/rainfall/data`;
      break;
    case '5':
      nameUrl=`${baseData}/api/basic/weather/station/wind/speed/data`;
      break;
    default:
      nameUrl=`${baseData}/api/basic/weather/station/temperature/data`;
  }
  return https.post({
    url: nameUrl,
    params: params
  });
};

apiFun.updateWeatherStationMonitor = function (type,params) {
  let nameUrl=''
  switch (type){
    case '1':
      nameUrl=`${baseData}/api/basic/weather/station/temperature/update`;
      break;
    case '2':
      nameUrl=`${baseData}/api/basic/weather/station/humidity/update`;
      break;
    case '3':
      nameUrl=`${baseData}/api/basic/weather/station/radiation/update`;
      break;
    case '4':
      nameUrl=`${baseData}/api/basic/weather/station/rainfall/update`;
      break;
    case '5':
      nameUrl=`${baseData}/api/basic/weather/station/wind/speed/update`;
      break;
    default:
      nameUrl=`${baseData}/api/basic/weather/station/temperature/update`;
  }
  return https.post({
    url: nameUrl,
    params: params
  });
};

//查询全部数据
/*apiFun.getAllWeatherStationMonitor = function (type,params) {
  let nameUrl=''
  switch (type){
    case '1':
      nameUrl=`${baseData}/api/basic/ecological/section/water/level/data`;
      break;
    case '2':
      nameUrl=`${baseData}/api/basic/ecological/section/flow/data`;
      break;
    default:
      nameUrl=`${baseData}/api/basic/ecological/section/water/level/data`;
  }
  return https.post({
    url: nameUrl,
    params: params
  });
};*/
/** 日志管理 - 操作日志 */
apiFun.getOperateLogList = function (params) {
  return https.post({
    url: "/log/operateLog/queryList",
    params: params,
  });
};
apiFun.getOperateLogQueryByID = function (params) {
  return https.get({
    url: "/log/operateLog/queryById",
    params: params,
  });
};
apiFun.deleteOperateLogByID = function (params) {
  return https.get({
    url: "/log/operateLog/deleteById",
    params: params
  });
};
//** 日志管理 - 系统日志 */
apiFun.getErrorLogList = function (params) {
  return https.post({
    url: "/log/errorLog/queryList",
    params: params,
  });
};
apiFun.getErrorLogQueryByID = function (params) {
  return https.get({
    url: "/log/errorLog/queryById",
    params: params,
  });
};
apiFun.deleteErrorLogByID = function (params) {
  return https.get({
    url: "/log/errorLog/deleteById",
    params: params
  });
};
//暴露出这个对象
export default apiFun;
